<template>
	<view >
		<view class="leadHead">
			<uni-row class="demo-uni-row" :width="nvueWidth">
				<uni-col :span="14">
					&nbsp;
				</uni-col>
				<uni-col :span="10">
					<uni-row class="demo-uni-row" :width="nvueWidth">
						<uni-col :span="7">
							<view class="texts">{{this.Number}}</view>
						</uni-col>
						<uni-col :span="1">
							&nbsp;
						</uni-col>
						<uni-col :span="14">
							<button @click="stopjorp()">跳过</button>
						</uni-col>
					</uni-row>
				</uni-col>
			</uni-row>
			<view class="images">
				<image src="https://img.axureshop.com/25/b4/10/25b4104f10ee4caebb973eb8225c8a01/images/%E5%BC%95%E5%AF%BC%E9%A1%B5/u39.png" mode=""></image>
			</view>
			<view class="images">
				<a href>扫码报修、手动创单</a>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				Number : 5
			}
		},
		 props: {
		    parentHandler: {
		      type: Function,
		      default: () => {
		        return Function;
		      },
		    },
		  },
		beforeMount() {
			this.start()
		},
		methods: {
			start (){
				let timens = setInterval(()=>{
					if(this.Number == 1){
						clearInterval(timens)
						this.parentHandler()
					}
					this.Number = --this.Number
					console.log(this.Number );
				},1000)
			},
			stopjorp(){
				this.Number = 1
				this.parentHandler()
			}
		}
	}
</script>


<style scoped>
	.texts{
		text-align: center;
		height: 90rpx;
		width: 90rpx;
		line-height: 90rpx;
		background-color: #3e52aa;
		border-radius: 50%;
		color: white;
	}
	.images{
		text-align: center;
	}
	a{
		text-decoration: none;
	}
</style>